package com.shop.loan.controller;

import com.shop.loan.annotation.LoginAuth;
import com.shop.loan.model.common.Constant;
import com.shop.loan.model.common.ResResult;
import com.shop.loan.model.vo.AppHomeVo;
import com.shop.loan.model.vo.GoodsVo;
import com.shop.loan.service.AppHomeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "首页数据", tags = "首页数据")
@RestController
@RequestMapping(Constant.appPrefex + "/home")
public class AppHomeController {

    @Resource
    AppHomeService appHomeService;

    @LoginAuth
    @ApiOperation("首页数据")
    @ApiResponses({
            @ApiResponse(code = 1, message = "成功", response = AppHomeVo.class)
    })
    @PostMapping("/get")
    public ResResult home(GoodsVo goodsVo) {
        return appHomeService.home(goodsVo);
    }



}
